if inside(getaProp(Child, #loc), getaProp(OBj, #TestRect)) then
setAt(getaProp(OBj, #MagsOut), MagNum, 0)
else
setAt(getaProp(OBj, #MagsOut), MagNum, 1)
end if
if getOne(getaProp(OBj, #MagsOut), 0) > 0 then
MakeDynamic(#ClockDrawer, #solved, #false)
MakeDynamic(#TVPhoneOBJ, #solved, #false)
MakeDynamic(#JuliaPaint, #solved, #false)
stopsound("A11tik.aif")
playSound("A11clock.aif", #cast)
else
MakeDynamic(#ClockDrawer, #solved, #true)
stopsound("A11clock.aif")
playSound("A10ckfix.aif", #cast, 1)
playSound("A11tik.aif", #cast)
end if
end
on EnterA13
SetTimeDail()
end
on DoaDial OBJref
set OBj to getaProp(gObjects, OBJref)
set thehots to getaProp(OBj, #thehotrects)
set CurNum to getaProp(OBj, #time)
set lastrect to getaProp(OBj, #DisplayState)
repeat while the mouseDown
set currect to InahotRect(thehots, the mouseH, the mouseV)
if (currect <> #empty) and (lastrect <> currect) then
set the castNum of sprite getaProp(OBj, #SpriteNum) to getaProp(getaProp(OBj, #cast), currect)
set the loc of sprite getaProp(OBj, #SpriteNum) to getAt(getaProp(OBj, #thelocs), currect)
updateStage()
if (currect > lastrect) or ((lastrect = 16) and (currect = 1)) then
set CurNum to CurNum + 1
else
if (currect < lastrect) or ((lastrect = 1) and (currect = 16)) then
set CurNum to CurNum - 1
end if
end if
if CurNum > getaProp(OBj, #TimeVal) then
set CurNum to getaProp(OBj, #startTime)
end if
if CurNum < getaProp(OBj, #startTime) then
set CurNum to getaProp(OBj, #TimeVal)
end if
MakeDynamic(OBJref, #time, CurNum)
SetTimeDail()
set lastrect to currect
end if
end repeat
ResetHotRects(OBJref)
MakeDynamic(OBJref, #DisplayState, lastrect)
end
on SetTimeDail
set Hour to getaProp(getaProp(gObjects, #JuliaDialHour), #time)
set min to getaProp(getaProp(gObjects, #JuliaDialMin), #time)
if Hour < 10 then
set Hour to string("0" & Hour)
end if
if min < 10 then
set min to string("0" & min)
end if
set theTime to Hour & ":" & min
set the text of cast getaProp(getaProp(getaProp(gObjects, #JuliaTime), #cast), #time) to theTime
end
on CheckDailTime
set movObj to getaProp(gObjects, #JuliaPaint)
set the loc of sprite getaProp(getaProp(gObjects, #JuliaCircle2), #SpriteNum) to point(-2000, -2000)
if (the text of cast getaProp(getaProp(getaProp(gObjects, #JuliaTime), #cast), #time) = "02:59") and (getaProp(getaProp(gObjects, #ClockDrawer), #solved) = #true) then
MakeDynamic(#JuliaPaint, #DisplayState, #right)
set the castNum of sprite getaProp(getaProp(gObjects, #JuliaGreenBut), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #JuliaGreenBut), #cast), #down)
set the castNum of sprite getaProp(getaProp(gObjects, #JuliaRedBut), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #JuliaRedBut), #cast), #UP)
MakeDynamic(#JuliaPaint, #solved, #true)
else
MakeDynamic(#JuliaPaint, #DisplayState, #Wrong)
set the castNum of sprite getaProp(getaProp(gObjects, #JuliaGreenBut), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #JuliaGreenBut), #cast), #UP)
set the castNum of sprite getaProp(getaProp(gObjects, #JuliaRedBut), #SpriteNum) to getaProp(getaProp(getaProp(gObjects, #JuliaRedBut), #cast), #down)
MakeDynamic(#JuliaPaint, #solved, #false)
MakeDynamic(#TVPhoneOBJ, #solved, #false)
end if
DoCharacterMovie(#JuliaPaint)
repeat while the movieTime of sprite getaProp(movObj, #SpriteNum) < the stopTime of sprite getaProp(movObj, #SpriteNum)
CursorandUpdate()
end repeat
MakeDynamic(#JuliaPaint, #DisplayState, #Paint)
set the loc of sprite getaProp(movObj, #SpriteNum) to point(-2000, -2000)
set the loc of sprite getaProp(getaProp(gObjects, #JuliaCircle2), #SpriteNum) to getaProp(getaProp(gObjects, #JuliaCircle), #loc)
end
on InahotRect Hotrects, H, V
set nHotr to count(Hotrects)
repeat with X = 1 to nHotr
if inside(point(H, V), getAt(Hotrects, X)) then
return X
end if
end repeat
return #empty
end
on ResetHotRects OBJref
set OBj to getaProp(gObjects, OBJref)
set hotrectnum to integer(getaProp(OBj, #SpriteNum) & "01")
MakeDynamic(OBJref, #loc, the loc of sprite getaProp(OBj, #SpriteNum))
setAt(getaProp(OBj, #Hotrect), 1, the rect of sprite getaProp(OBj, #SpriteNum))